package model.feature;

import java.util.Collection;
import java.util.Map;

import model.Container;
import model.Playable;
import model.contents.Content;

public class FeatureRecord implements Playable{
	
	private Map<Container, Content> contentMap;
	private Container c;

	public Container getC() {
		return c;
	}

	public void setC(Container c) {
		this.c = c;
	}

	public FeatureRecord(Map<Container, Content> map) {
		this.contentMap = map;
	}
	
	public boolean play() {
		//System.out.println("Playing from here bull "+c.getId());
		
		this.layoutAreas();
		return true;
	}

	private void layoutAreas() {
		if(contentMap == null)
			return;
		for (Container c : contentMap.keySet()) {
			
			System.out.println("-------------Content information------------");
			System.out.println(c.getId());
			System.out.println(c.getWidth());
			System.out.println(c.getHeight());
			System.out.println("----------------------------------------------");
			
			
			Content content = this.contentMap.get(c);
			if (content != null) {
				 System.out.println("Playing content: " + this.contentMap.get(c) +
						 " in " + c);
				c.setContent(content);
			}
		}
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		WeatherItems itm = WeatherItems.getInstance();
		Map<Integer, WeatherItems> list = itm.getWeatherItemsList();
		Collection<Integer> Record = list.keySet();
        //;
		
       int recsize = Record.size();
       System.out.println(recsize);
       
       
       int i = 1;
       
       for(int a : Record)
       {
    	  
    	   System.out.println(list.get(a).getMinTemp());
    	   System.out.println(" I = "+i);
    	   i++;
       }
	}
}
